package com.dragon.mmochat.message;

import com.dragon.mmochat.MmochatConstant;
import com.dragon.mmochat.model.battle.MmochatAction;
import com.dragon.mmochat.model.enumType.MmochatActionType;
import com.dragon.mmochat.model.enumType.MmochatObjectType;
import com.skymobi.buffer.SkymobiBuffer;
import com.skymobi.message.SkymobiProtocolMessage;

public class Mmochat_3_7C extends SkymobiProtocolMessage {
	int hallState;
	MmochatAction action = new MmochatAction();

	public Mmochat_3_7C() {
		setMsgCode(MmochatConstant.MSGCODE_MMOCHAT_C_3_7);
	}

	@Override
	protected void decodeBody(SkymobiBuffer in) {
		hallState = in.getUnsignedShort();
		action.setGridId(in.getInt());
		action.setBattleId(in.getInt());
		action.setTurn((short) in.getInt());
		action.setPos((byte) in.getInt());
		action.setActionType(MmochatActionType.召唤);
		action.setTargetPos((byte) 0);
	}

	public int getHallState() {
		return hallState;
	}

	public MmochatAction getAction() {
		return action;
	}

}